package com.example.sherlockzhong.plush_v2.CardBeans;

/*
 * Created by DosonLeung on 2014/8/25.
 */

import com.example.sherlockzhong.plush_v2.R;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AddOrgBean {
    private int length = 0;
    private Object[] OrgId = {};
    private Object[] titles = {};
    private Object[] subtitles = {};
    private List<Map<String, Object>> organization_list = new ArrayList<Map<String, Object>>();
    private String[] itemName = {"filepath", "title", "subtitle"};
    private int[] itemId = {R.id.add_org_icon, R.id.add_org_title, R.id.add_org_subtitle};
    private Object[] filepath = {"", "", ""};

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public Object[] getTitles() {
        return titles;
    }

    public void setTitles(Object[] titles) {
        this.titles = titles;
    }

    public String[] getItemName() {
        return itemName;
    }

    public void setItemName(String[] itemName) {
        this.itemName = itemName;
    }

    public int[] getItemId() {
        return itemId;
    }

    public void setItemId(int[] itemId) {
        this.itemId = itemId;
    }

    public Object[] getSubtitles() {
        return subtitles;
    }

    public void setSubtitles(Object[] subtitles) {
        this.subtitles = subtitles;
    }

    public Object[] getFilepath() {
        return filepath;
    }

    public void setFilepath(Object[] filepath) {
        this.filepath = filepath;
    }

    public Object[] getOrgId() {
        return OrgId;
    }

    public void setOrgId(Object[] orgId) {
        OrgId = orgId;
    }

    public List<Map<String, Object>> generateDataList() {
        organization_list = new ArrayList<Map<String, Object>>();
        for (int i = 0; i < length; i++) {
            Map<String, Object> item = new HashMap<String, Object>();
            item.put("filepath", filepath[i]);
            item.put("title", titles[i]);
            item.put("subtitle", subtitles[i]);
            organization_list.add(item);
        }
        return organization_list;
    }
}
